/*******************************************************************************
 * @project: EveryClass
 * @package: com.burns.everyclass.test
 * @file: GetClassFromJar.java
 * @author: Administrator
 * @created: 2017-6-2
 * @purpose:
 * 
 * @version: 1.0
 * 
 * Revision History at the end of file.
 * 
 * Copyright 2017 AcconSys All rights reserved.
 ******************************************************************************/

package com.burns.everyclass.test;

import java.net.URL;

import com.burns.everyclass.utils.PackageUtil;

public class GetClassFromJar {

	public static void main(String[] args) {
		/**
		 * 通过工具类获取
		 */
		// String packageName = "kos.tccapital.service";
		// PackageUtil.getClassName(packageName);

		/**
		 * 获取包下的package
		 */
		/**
		 * url值为null
		 * String packageName = "kos.tccapital.service";
		 */
		
		/**
		 *  url值为null
		 * String packageName = "kos/tccapital/service";
		 */
		
		/**
		 *  url值为null
		 * String packageName = "com.acconsys.avidm4.utils";
		 */

		/**
		 * url值为：jar:file:/D:/eclipse_wks/EveryClass/lib/capital-avidm4.jar!/com/acconsys/avidm4/utils
		 * url.getPath()值为:file:/D:/eclipse_wks/EveryClass/lib/capital-avidm4.jar!/com/acconsys/avidm4/utils
		 * String packageName = "com.acconsys.avidm4.utils";
		 */
		String packageName = "com/acconsys/avidm4/utils";
		URL url = Thread.currentThread().getContextClassLoader()
				.getResource(packageName);
		System.out.println(url);
		if (url != null) {
			System.out.println(url.getPath());
		}

	}
}

/*******************************************************************************
 * <B>Revision History</B><BR>
 * [type 'revision' and press Alt + / to insert revision block]<BR>
 * 
 * 
 * 
 * Copyright 2017 AcconSys All rights reserved.
 ******************************************************************************/
